package com.fifth.emp.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fifth.common.pojo.entity.Permission;
import com.fifth.common.pojo.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 徐志豪
 * @since 2022-09-02
 */
@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    //连表查询
    IPage<Role> selectRole(IPage<Role> page, @Param("ew") Wrapper<Role> wrapper);

    List<Role> selectRoleAll();

    List<Permission> selectPermissionByRoleId(String roleId);
}
